#ifndef ENGINE_SYNAPTIC_SURFACE_H
#define ENGINE_SYNAPTIC_SURFACE_H


#include <map>
#include <string>
#include "SDL.h"

namespace Misc { struct Frame; } 

namespace Engine {

namespace Synaptic {

class Surface {
  private:
	static std::map<std::string, SDL_Surface *> surfaceMap; // Keep track of every system surface

  public:
	static SDL_Surface * getSurface(std::string fileName) throw(const char *); 
	static void setSurface(std::string name, SDL_Surface * surface); 
	static void blit(const SDL_Surface * const source, const Misc::Frame & srcframe, SDL_Surface * destination, Misc::Frame & dstframe); 
	static SDL_Surface * slice(std::string from, const Misc::Frame & sliceFrame, std::string newName); 
	static SDL_Surface * resize(std::string sourceName, double xFactor, double yFactor, std::string newName); 
	static SDL_Surface * rotate(std::string sourceName, double degree, std::string newName); 
	static SDL_Surface * create(Uint32 width, Uint32 height, Uint32 flags); // Creates a new surface with the given width and height and flags
};

} // namespace Engine::Synaptic

} // namespace Engine
#endif
